#include <setxyDialog.h>
SetxyDialog::SetxyDialog(QWidget *parent):QDialog(parent){
    this->setWindowTitle("设置长宽");
    this->setFixedSize(200,200);
    spx=new QSpinBox(this);
    spx->setGeometry(10,0,80,20);
    spx->setMaximum(100);
    spx->setMinimum(5);
    spy=new QSpinBox(this);
    spy->setGeometry(90,0,80,20);
    spy->setMaximum(100);
    spy->setMinimum(5);
    setbtn=new QPushButton("SET",this);
    setbtn->setGeometry(50,100,60,20);
    connect(setbtn,SIGNAL(clicked(bool)),this,SLOT(setxy()));
}
void SetxyDialog::setxy(){
    x=spx->value();
    y=spy->value();
    this->accept();
    return;
}
